home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 1.6 / Buddy API Docs.swf / texts / 1490.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  2.2 KB  |  67 lines

  1. 107
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. Specifying file names
  6. --- RECORDSEPARATOR ---
  7.  
  8. --- RECORDSEPARATOR ---
  9. You should always pass in the full path name to the file you want to work with. For example, use 
  10. --- RECORDSEPARATOR ---
  11. baOpenFile( "Mac HD:Data:myfile.pdf", "normal" ) ΓÇô
  12. --- RECORDSEPARATOR ---
  13.  Mac
  14. --- RECORDSEPARATOR ---
  15.  
  16. --- RECORDSEPARATOR ---
  17. baOpenFile( "c:\Data\myfile.pdf", "normal" ) ΓÇô
  18. --- RECORDSEPARATOR ---
  19.  Windows
  20. --- RECORDSEPARATOR ---
  21.  
  22. --- RECORDSEPARATOR ---
  23. rather than 
  24. --- RECORDSEPARATOR ---
  25. baOpenFile( "myFile.pdf", "normal" ) 
  26. --- RECORDSEPARATOR ---
  27. You should do this even when the file you are working with is in the same folder as your projector. If 
  28. --- RECORDSEPARATOR ---
  29. you want to work with a file that is relative to your projector, then you can use Lingo's the 
  30. --- RECORDSEPARATOR ---
  31. applicationPath or the moviePath variables. These variables return the path to the projector or the 
  32. --- RECORDSEPARATOR ---
  33. current .dir file. To open a file in the same folder as your projector, use: 
  34. --- RECORDSEPARATOR ---
  35. baOpenFile( the applicationPath & "myFile.pdf" ) 
  36. --- RECORDSEPARATOR ---
  37. To open a file in a folder, add it to the path. 
  38. --- RECORDSEPARATOR ---
  39. baOpenFile( the applicationPath & "data:myFile.pdf" ) ΓÇô
  40. --- RECORDSEPARATOR ---
  41.  Mac
  42. --- RECORDSEPARATOR ---
  43.  
  44. --- RECORDSEPARATOR ---
  45. baOpenFile( the applicationPath & "data\myFile.pdf" ) ΓÇô
  46. --- RECORDSEPARATOR ---
  47.  Windows
  48. --- RECORDSEPARATOR ---
  49.  
  50. --- RECORDSEPARATOR ---
  51. You can also use Lingo's @ operator. This is the same as the moviePath, but can be used to specify 
  52. --- RECORDSEPARATOR ---
  53. cross-platform path names. Where a : / or \ character is included in your path name, it will be 
  54. --- RECORDSEPARATOR ---
  55. translated to the appropriate path separator. 
  56. --- RECORDSEPARATOR ---
  57. baOpenFile( "@:Data:myFile.pdf", "normal" ) 
  58. --- RECORDSEPARATOR ---
  59. baOpenFile( "@/Data/myFile.pdf", "normal" ) 
  60. --- RECORDSEPARATOR ---
  61. baOpenFile( "@\Data\myFile.pdf", "normal" ) 
  62. --- RECORDSEPARATOR ---
  63. will all open the myfile.pdf in the Data subfolder on both platforms. 
  64. --- RECORDSEPARATOR ---
  65. You must include a folder separator after the @. 
  66. --- RECORDSEPARATOR ---
  67. For the @ operator to work, you need Mac version 1.4 and Windows 3.6.